<?php
namespace app\api\model;

class HotelModel extends BaseModel
{
    //banner图数据处理
    public function getRule()
    {
        return $list = db('hotel_rule')->find();

    }
    public function getHotelInfo()
    {
        $list = db('hotel')->find();
        $list['banner'] = explode(',',$list['banner']);
        $support = explode(',',$list['support_id']);
        $support_array = db('hotel_support')->where(['id'=>['in',$support]])->select();
        $list['support_id'] = $support_array; 
        return $list;
    }
}
